/**
 * ExhibitionQueryBean.java   2017年9月16日 下午3:46:16 by xuebing 
 *
 * Copyright (c) 2010 - 2017 All rights reserved.
 * 
 */
package com.rongmai.db.mapper.param;

public class ExhibitionQueryBean {

    private String exhibitionId;
    private Integer pageNo = 1;
    private Integer offset = 0;
    private Integer size = 10;

    public ExhibitionQueryBean() {
        this.pageNo = 1;
    }
    
    public ExhibitionQueryBean(int pageNo, int size) {
        this.pageNo = pageNo;
        this.size = size;
    }

    public String getExhibitionId() {
        return exhibitionId;
    }

    public void setExhibitionId(String exhibitionId) {
        this.exhibitionId = exhibitionId;
    }

    public Integer getPageNo() {
        if (this.pageNo == null) {
            this.pageNo = 1;
        }
        return this.pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getOffset() {
        if (this.pageNo == null || this.pageNo <= 1) {
            this.offset = 0;
        } else {
            this.offset = (this.pageNo - 1) * this.size;
        }
        return this.offset;
    }

    public Integer getSize() {
        return size;
    }
    
    public void setSize(Integer size) {
        this.size = size;
    }
    
}
